package com.mallcloud.mall.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum RegionLevelEnum {

	state("0", "国家"),
	province("1", "省"),
	city("2", "市"),
	county("3", "区"),
	;

	private String type;
	private String description;

	public static String getDecs(String type) {
		return Arrays.stream(values()).filter(x -> x.getType().equals(type)).findFirst().get().getDescription();
	}

}
